{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 下载可转债数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "from xtquant import xtdata\n",
    "# xtdata.connect(port=58609)\n",
    "\n",
    "xtdata.download_cb_data()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'bondCode': '',\n",
       " 'bondName': '',\n",
       " 'stockCode': '',\n",
       " 'stockName': '',\n",
       " 'bondMaturity': 0.0,\n",
       " 'bondParvalue': 4.450147717014403e-307,\n",
       " 'bondIssuePrice': 1.2461174142225795e-306,\n",
       " 'bondIssueSize': 3.1408287e-317,\n",
       " 'bondValueDate': '0',\n",
       " 'bondMaturityDate': '0',\n",
       " 'bondCouponRate': 0.0,\n",
       " 'bondAddRate': 0.0,\n",
       " 'bondListDate': '0',\n",
       " 'delistDate': '0',\n",
       " 'convStartDate': '0',\n",
       " 'convEndDate': '0',\n",
       " 'firstConvPrice': 0.0,\n",
       " 'bondConvPrice': 0.0,\n",
       " 'forceRedeemTradeDate': '0',\n",
       " 'forceRedeemConvDate': '0',\n",
       " 'forceRedeemPrice': 0.0,\n",
       " 'triggerForceRedeemPrice': 0.0,\n",
       " 'triggerRepurchasePrice': 0.0,\n",
       " 'expireRedeemPrice': 0.0,\n",
       " 'termYear': 0.0,\n",
       " 'interestType': 133596211942073066}"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "res = xtdata.get_cb_info('127105.SZ')\n",
    "res"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "miniqmt-demo-cptEsqYo-py3.10",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
